﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace PYNET.Models
{
    public class MyAccountViewModel
    {

        [Required]
        [Display(Name = "新用户名")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "原密码")]
        public string OldPassword { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "新密码")]
        public string Password { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "确认密码")]
        [Compare("Password", ErrorMessage = "前后密码不一致")]
        public string ConfirmPassword { get; set; }

        public List<Comment> comments { get; set; }

        public IFormFile HeadPicture { get; set; }
    }
}
